package com.icinfo.wanandroid.di.component;

import com.icinfo.wanandroid.app.WanAndroidApp;
import com.icinfo.wanandroid.core.DataManager;
import com.icinfo.wanandroid.di.module.AbstractAllActivityModule;
import com.icinfo.wanandroid.di.module.AppModule;
import com.icinfo.wanandroid.di.module.HttpModule;

import javax.inject.Singleton;

import dagger.Component;
import dagger.android.AndroidInjectionModule;
import dagger.android.support.AndroidSupportInjectionModule;

/**
 * Author: 胡高建
 * Comment: //TODO
 * Date: 2019-07-24 15:32
 */
@Singleton
@Component(modules = {AndroidInjectionModule.class,
        AndroidSupportInjectionModule.class,
        AbstractAllActivityModule.class,
        AppModule.class,
        HttpModule.class,
})
public interface AppComponent {
    /**
     * 注入wandroid实例
     *
     * @param wanAndroidApp
     */
    void inject(WanAndroidApp wanAndroidApp);

    /**
     * 获取APP的context
     *
     * @return
     */
    WanAndroidApp getContext();

    /**
     * 数据中心sa
     *
     * @return
     */
    DataManager getDataManager();
}
